import {defineStore} from "pinia";

export const useCartStore = defineStore('cart', {
    state: () => {
        return {
            items: []
        }
    },
    actions: {
        addItem: (item) => {
            this.items.push(item);
        },
        removeItem: (index) => {
            this.items.splice(index, 1);
        }
    }
});